using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BrickCtrl : MonoBehaviour
{
    private BricksData Data;
    [SerializeField]
    private BoxCollider2D m_BrcCol;
    [SerializeField]
    private SpriteRenderer m_Spr;

    private bool m_CanHit;

    public void SetState(bool b)
    {
        m_CanHit = b;
        if (b)
        {
            m_Spr.enabled = false;
            m_BrcCol.isTrigger = true;
            m_BrcCol.size = m_BrcCol.size.SetX(0.26f);
            m_BrcCol.edgeRadius = 0;
        }
        else
        {
            m_Spr.enabled = true;
            m_BrcCol.isTrigger = false;
        }
    }
}
